#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class ControlPermissions2 : Business.BusinessBase<ControlPermissions2, int>
	{
		#region Fields and Properties

		private int permissionsKey = 0;
		/// <summary>
		/// 
		/// </summary>
		public int PermissionsKey
		{
			get { return permissionsKey; }
			set
			{
				if (value != permissionsKey)
				{
					MarkChanged("PermissionsKey");
					permissionsKey = value;
				}
			}
		}

		private int controlKey = 0;
		/// <summary>
		/// 
		/// </summary>
		public int ControlKey
		{
			get { return controlKey; }
			set
			{
				if (value != controlKey)
				{
					MarkChanged("ControlKey");
					controlKey = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public ControlPermissions2()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override ControlPermissions2 DataSelect(int id)
		{
			return Services.DALService.ControlPermissions2Service.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.ControlPermissions2Service.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.ControlPermissions2Service.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.ControlPermissions2Service.Delete(this);
		}

		#endregion Base overrides
	}
}
